google.load("jquery", "1.3.2");

var map;
var mass = "North America";

function initialize() {
	if (GBrowserIsCompatible()) {

		map = new GMap2(document.getElementById("map"));

	//	var clnt = new GLatLng();

		// Americas
		if(mass == "North America") {
			map.setCenter(new GLatLng(38, 0), 1);
		} else if( mass == "Central America" ) {
			map.setCenter(new GLatLng(38, 0), 1);
		} else if(mass == "South America") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Asia") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Atlantic Ocean") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Pacific Ocean") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Indian Ocean") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Australia") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Africa") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Europe") {
			map.setCenter(new GLatLng(38, 150), 1);
		} else if(mass == "Antarctica") {
			map.setCenter(new GLatLng(38, 150), 1);
		}


		// Default set Google Maps UI ***** [[ HARD SELECTION ]] **
		//map.setUIToDefault();

		// Set position ******************* [[ HARD SELECTION ]] **
		//map.setCenter(new GLatLng(38, 150), 1);

		// Dissable mouse click+drag
		map.disableDragging();

		// User location
		var bounds = map.getBounds();
		var southWest = bounds.getSouthWest();
		var northEast = bounds.getNorthEast();
		var lngSpan = northEast.lng() - southWest.lng();
		var latSpan = northEast.lat() - southWest.lat();
		var userLocation = new GLatLng(southWest.lat() + latSpan * Math.random(), southWest.lng() + lngSpan * Math.random());
		map.addOverlay(new GMarker(userLocation));

	}
}

function refresh() {
	
}

function locationToggle () {
	
}

function zoomIn() {
	map.setCenter(new GLatLng(38, 150), 2);
}

function zoomOut() {
	map.setCenter(new GLatLng(38, 150), 1);
}

